Printer systems in which information to be printed is provided in the form of digital data are well known. Typically an image consisting of text or of a limited number of bit patterns may be represented in coded form, with each character represented by a code consisting of a small number of bits (typically 9). The codes are fed into a character generator which creates the bit pattern to be printed. For many graphical or scanned images, however, this form of representation is not practical because of the large number of potential bit patterns. Such images may be made available in raster form, with each image pel represented by a single bit and with the image lines arranged in raster scan order. This raster data is often stored in a compressed form in which the same information is described more compactly. A variety of systems for compressing and decompressing the binary image data are available. For example, available compression methods for binary images include, but are by no means limited to, those disclosed in:
L. R. Bahl, D. I. Barnea, and H. Kobayashi, "Image Compaction System", U.S. Pat. No. 3,833,900, 1974;
T. H. Morrin, "Recursive Contour Coding of Nested Objects in Black/White Images," International Conference on Communications conference records, June 1975, Vol. 1, pp. 7-17;
Y. Nakagome, H. Teramura, Y. Yamasaki, and Y. Wakahara, "System for Coding Information Change Picture Elements in Facsimile Signal", U.S. Pat. No. 4,040,093, 1977, and "Method for Coding Facsimile Signal", U.S. Pat. No. 4,121,258, 1978;
A. J. Frank, "Variable Length Codes for High Quality Image Encoding", U.S. Pat. No. 4,103,287, 1978;
G. Goertzel and J. L. Mitchell, "Two-Dimensional Image Data Compression and Decompression System," U.S. Defensive Publication No. T985,005, Aug. 7, 1979; and
R. Hunter and A. H. Robinson, "International Digital Facsimile Coding Standards," Proceedings of the IEEE, Vol. 68, No. 7 (July 1980), pp. 854-867.
The image compression method relevant to the present invention is described in the commonly-assigned, copending U.S. patent application Ser. No. 841,483 of J. L. Mitchell, G. Goertzel, and K. L. Anderson, entitled "Method for Encoding and Decoding a Digital Image".
Many printers are designed to print a number of raster scan lines in parallel. In such systems, the image data is arranged so that each unit of input data describes a set of vertically adjacent image pels, the bits in a unit controlling individual print elements. For example, an eight-bit byte may be used to drive a column of eight print elements. The most significant bit may control the top print element, the second most significant bit the second print element, and so on down to the least significant bit which controls the bottom print element. The stream of bytes needed to drive the printer to create an eight-row unit in such a system is the transpose of the eight lines of raster data to be printed. In some systems, such as the IBM 4250 printer, the transposed raster data may be compressed before being transmitted to the printer. For the IBM 4250 printer this compression consists of coding a repetition count for bytes having the values X`00` and X`FF` in order to reduce the transmission time required to send the large areas of black or white pels which occur in many images.
In order to convert image data from the normal raster scan format to a format suitable for transmission to such a printer, the image must be divided into horizontal strips N pels high, where N is the number of bits which are required to control the available column of print elements. Each horizontal strip must then be transposed, or alternatively rotated 90 degrees counterclockwise, which will produce the same result as transposing except that the bytes are in reverse order. Many systems are available to perform this operation, some of which are described below. To print an image which is stored in compressed form, it is necessary to decompress the image to create the raster data before applying the appropriate methods. Any required compression of the transposed data can be folded into the transposition process or performed as a separate step following it. The transposition and compression of data for the 4250 printer can be performed by existing software packages such as IBM Program Products "IPG" and "Image Handling Facility" (IHF).
Several systems are available which can rotate or transpose raster image data. These include those disclosed in:
P. J. Evans, "Image Rotation Apparatus", U.S. Pat. No. 4,168,488, 1979;
G. Goertzel, K. L. Anderson, F. C. Mintzer, and J. L. Mitchell, "Method for Rotating a Binary Image", U.S. Pat. No. 4,627,020, 1986;
J. B. Lotspiech, "Method and Apparatus for Rotating the Scan Format of Digital Images", U.S. Pat. No. 4,271,476, 1981, which describes a method that can be used to rotate images in raster or compressed form;
T. H. Morrin, "Rotation of Images Using Contour Compressed Data", IBM Technical Disclosure Bulletin, Vol. 18, No. 8 (January 1976), pp. 2640-2642, which discusses rotation of images compressed using contour coding methods; and
The present inventors in commonly-assigned U.S. Pat. No. 4,658,430 entitled "System for Rotating a Binary Image", describe a system which accepts data in the run end form used in the present invention and creates a rotated output image in raster form; but this is done by creating the unrotated raster image with the bytes stored in a non-standard order which makes it more convenient to pick up groups of these bytes and rotate them.
The commonly-used methods of decompressing an image and then transposing or rotating the raster data do not take advantage of the fact that in some data compression schemes there exists a representation of the image that is intermediate between the compressed form and the raster data and is produced with less computational effort than the required to create the raster data for the original image. In above-noted, co-pending U.S. patent application Ser. No. 841,483 of J. L. Mitchell et al, entitled, "Method for Encoding and Decoding a Digital Image", this form consists of vectors of run ends representing successive raster scan lines. It is an object of the present invention to take advantage of the existence of this representation to create the transposed or rotated raster image data directly from it, without going through the intermediate stage of creating the untransposed raster image. It is a further object of this invention to perform required alteration of the transposed or rotated raster data as part of the conversion process.
The use of the intermediate representation of the image as input to the transposition process of the invention, while preferred, does not preclude, however, the application of this method to uncompressed raster data, since the raster data can conveniently be converted to the intermediate form. Suitable methods for performing this conversion are described in the commonly-assigned, U.S. Pat. No. 4,610,027 of K. L. Anderson, J. L. Mitchell, and G. Goertzel, entitled "A Method for Converting a Bit Map of an Image to a Run Length or Run End Representation," and in the commonly-assigned, U.S. Pat. No. 4,646,356 of K. L. Anderson, G. Goertzel, J. L. Mitchell, and W. B. Pennebaker, entitled "An Improved Method for Converting a Bit Map of an Image to a Run Length or Run End Representation."